<!DOCTYPE html>
{% load staticfiles %}
<html lang="en">
<head>
    <meta charset="UTF_8">
    <title>{% block title %}嘿，小柿子影评{% endblock %}</title>
    <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css"
          integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
{#        <link rel="stylesheet" href="https://cdn.jsdelivr.net/semantic-ui/2.2.13/semantic.min.css">#}
    <link rel="stylesheet" href="{% static 'movie/css/semantic.min.css' %}">
    <link rel="stylesheet" href="{% static 'movie/css/layout.css' %}">
        <script src="https://cdn.jsdelivr.net/semantic-ui/2.2.13/semantic.min.js"></script>
    <script src="{% static 'movie/js/semantic.min.js' %}"></script>
    <script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
    <script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"
            integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa"
            crossorigin="anonymous"></script>
    <script src="{% static 'movie/js/fulltext.js' %}"></script>
    {% block extra_head %}
    {% endblock %}
</head>
<body>
{#导航栏#}
<div class="navbar navbar-inverse" role="navigation">
    <div class="container">
        <div class="navbar-header">
            <a class="navbar-brand" href="{% url 'movie:movie_index' 1 %}">
                <i></i>小柿子</a>
        </div>
        <div class="navbar-collapse collapse">
            <ul class="nav navbar-nav">
                <li><a href="/">Home</a></li>
                <li><a href="{% url 'post:review_square' %}">图解广场</a></li>
                <li><a href="{% url 'post:chart_index' %}">Charts</a></li>
            </ul>
            <ul class="fulltext nav navbar-nav">
                <li>
                    <div class="input-group fulltext-action">
                        <input type="text" name="q" class="form-control i-fulltext-search"
                               placeholder="输入电影名or演员名or图解集名" list="fulltext-list">
                        <span class="input-group-btn">
                        <input type="submit" role="button" class="btn a-fulltext-search">搜索</input>
                        </span>
                    </div>
                    <datalist id="fulltext-list"></datalist>
                </li>
            </ul>
            <ul class="nav navbar-nav navbar-right">
                {% if user.is_authenticated %}
                    <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                            {% if user.avatar %}
                                <img class="img-rounded profile-thumbnail b-avatar" src="/media/{{ user.avatar }}">
                            {% else %}<img class="img-rounded profile-thumbnail" src="#">
                            {% endif %}
                            {{ user.username }} <b class="caret"></b>
                        </a>
                        <ul class="dropdown-menu">
                            {% if user.is_authenticated %}
                                <li>
                                    <a href='{% url 'auser:homepage' user.id %}'>Profile
                                    </a>
                                </li>
                            {% endif %}
                            <li><a href="{% url 'auser:changepwd' user.id %}">Change Password</a></li>
                            <li><a href="{% url 'auser:changeemail' user.id %}">Change Email</a></li>
                            <li><a href="{% url 'auser:change_avatar' user.id %}">Change avatar</a></li>
                            <li role="separator" class="divider"></li>
                            <li><a href="{% url 'auser:logout' %}">Log out</a></li>
                        </ul>
                    </li>
                {% else %}
                    <li><a href="{% url 'auser:login' %}">Log In</a></li>
                {% endif %}
            </ul>
        </div>
    </div>
</div>
<div class="docker">
    {% block navbar %}
    {% endblock %}

    {% block content %}
    {% endblock %}
</div>
{% block footer %}
{% endblock %}

</body>

{% block script %}
{% endblock %}
</html>